include(ExternalProject)

macro(CPM_INCLUDE project_name version)
    CPMAddPackage(
        NAME ${project_name}
        GIT_REPOSITORY https://gitee.com/qlpmsp_thirdparty/${project_name}_builds.git
        GIT_TAG ${version}
        DOWNLOAD_ONLY YES
    )

    if(${project_name}_ADDED)
        include(${${project_name}_SOURCE_DIR}/${project_name}.cmake)
    endif()

    message("${project_name}_SOURCE_DIR ${${project_name}_SOURCE_DIR}")
endmacro()
